package cn.edu.eight.food.service.Impl;


import cn.edu.eight.food.dao.OfUserMapper;
import cn.edu.eight.food.model.OfUser;
import cn.edu.eight.food.service.ofUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ofUserServiceImpl implements ofUserService {
    @Autowired
    private OfUserMapper ofUserMapper;

    @Override
    public int insert(OfUser record) {
        return ofUserMapper.insert(record);
    }

    @Override
    public OfUser adminLogin(String username, String password) {
        return ofUserMapper.adminLogin(username,password);
    }

    @Override
    public OfUser userLogin(String username, String password) {
        return ofUserMapper.userLogin(username,password);
    }

    @Override
    public List<OfUser> users(String userId, String username, String mobile) {
        return ofUserMapper.users(userId,username,mobile);
    }

    @Override
    public int updateUser(OfUser record) {
        return ofUserMapper.updateUser(record);
    }

    @Override
    public int deleteUser(String userId) {
        return ofUserMapper.deleteUser(userId);
    }
}
